<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>优惠详情</title>
<!-- Bootstrap -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link href="__PUBLIC__/Css/sale.css" rel="stylesheet">
</head>
<body>
<div class="container-fluid">
   <!--  <nav class="row " id="nav">
        <div class="col-xs-2">
            <button class="btn btn-default" type="submit" id="btn1">
                <span class='glyphicon glyphicon-menu-left' aria-hidden="true"></span>
            </button>
        </div>
        <div class="col-xs-8 text-center">
            <p>{$predetails[0].shopname}</p>
        </div>
        <div class="col-xs-2">
            <button class="btn btn-default" type="submit" id="btn2">
                <span class='glyphicon glyphicon-th-list' aria-hidden="true"></span>
            </button>
        </div>
    </nav> -->
    
       <div class="navbar-header navbar navbar-inverse" style="margin-bottom:0;">
         <div class="navbar-brand" >
            <a href="__CONTROLLER__/showPrefe" style="text-decoration: none"><span class="glyphicon glyphicon-arrow-left white" style="color:#9d9d9d;"></span>
            <span style="color:#9d9d9d;">优惠列表</span></a>
       </div></div>
   
    <div class="row" id="header">
        <div id="headerimg">
        </div>
    </div>
    </div>
<div class="container msg">
    <div class="row">
        <div class="media">
            <div class="media-left">
                <a href="#">
                    <img class="img-circle media-object" src="{$predetails[0].logo}" width="60px" height="60px">
                </a>
            </div>
            <div class="media-body">
                <h4 class="media-heading">{$predetails[0].shopname}</h4>
            </div>
            <h3>{$predetails[0].name}</h3>
            <img src="__PUBLIC__/Images/moneyicon.png" class="img-circle" width="30px" height="30px">
            <span>   仅售<span>{$predetails[0].now_price}</span>元  <del>  ￥<span>{$predetails[0].used_price}</span>元</del></span>
           <!--  <h5>已有5人报名</h5> -->
        </div>
    </div>
</div>
<ul id="myTab" class="nav nav-tabs">
    <li class="active"><a href="#message" data-toggle="tab">优惠详情</a></li>
    <li><a href="#answer" data-toggle="tab">用户评论</a></li>
</ul>
<div id="myTabContent" class="tab-content">
    <div class="tab-pane fade in active" id="message">
        <span>适用范围</span>
        <ul>
            <li>除酒水、饮料、餐位费外全场通用</li>
        </ul>
        <span>有效期</span>
        <ul>
            <li><span>{$predetails[0].beg_time}</span>  至 <span>{$predetails[0].end_time}</span> （周末、法定节假日通用）</li>
        </ul>
        <span>使用时间</span>
        <ul>
            <li>09:30-13:30,16:30-21:30</li>
        </ul>
        <span>使用规则</span>
        <ul>
            <li>无需预约，消费高峰时可能需要等位</li>
            <li>可叠加使用</li>
        </ul>
        <span>不兑现、不找零</span>
        <ul>
            <li>不可使用包间</li>
            <li>仅限堂食，不提供餐前外带，餐毕未吃完可打包，打包费详情咨询商家</li>
            <li>如需开具发票，请在消费前告知商家<br>
            团购用户不可同时享受商家其他优惠<br>
            酒水饮料等问题，请致电商家咨询，以商家反馈为准</li>
        </ul>
        <span>提供免费WiFi</span>
        <ul>
            <li>停车位收费标准：停车位详情咨询商家</li>
        </ul>
    </div>
    <div class="tab-pane fade" id="answer">
    
    </div>
</div>

<nav class="navbar navbar-default navbar-fixed-bottom  text-center">
    
            <button class="btn btn-danger" type="submit" id="btnsign">
                <span>使用优惠</span>
            </button>
       
</nav>

<!--jquery-->
<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<!--js-->
<script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<!-- <script src="__PUBLIC__/Js/tab.js"></script> -->
<script src="__PUBLIC__/Js/Friends.js"></script>
<script>
    var $requirenum='{$predetails[0].num}';
    var $countnum='{$signnum[0].num}';
    // if ($("#btnsign").css("background-color")=='#d9534f') {
         $("#btnsign").on("click",function(){
            if ($countnum>=$requirenum) {
                alert("使用成功");
                $("#btnsign").css({"background-color":"#d7d7d7","border-color":"#ccc"});
            }else{
                alert("使用成功");
            }

        });
    // }
    var $banner='{$predetails[0].image}';
    //设置banner与券的图片一致
    $("#headerimg").css({"background-image":"url("+$banner+")","background-size":"cover"});
   
</script>
</body>
</html>